//
//  titleView.m
//  SimpleHappy
//
//  Created by lanou on 15/11/24.
//  Copyright (c) 2015年 RockyFung. All rights reserved.
//

#import "titleView.h"
#import "Define.h"
@implementation titleView
-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.backButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.backButton.frame =CGRectMake(frame.size.height/4, frame.size.height/2, frame.size.height*7/15, frame.size.height/2);
        [self.backButton setImage:[UIImage imageNamed:@"cha"] forState:UIControlStateNormal];
        
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, frame.size.width/3, frame.size.height/2)];
        self.titleLabel.center = CGPointMake(KScreenWidth/2, frame.size.height*3/4);
        self.titleLabel.font= [UIFont boldSystemFontOfSize:17*KScreenWidth/375];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_backButton];
        [self addSubview:_titleLabel];
    }
    return self;
}
@end
